<template>
  <div>
    <h1>子组件</h1>
    <h2>{{ message }}</h2>
    <button @click="doclick">vuex点击</button>
    <button @click="$store.commit('user/incre')">vuex-commit</button>
    <button @click="$store.dispatch('incre')">action</button>
  </div>
</template>

<script>
export default {
  name: "Main",
  data() {
    return {
      message: "helloword single component"
    };
  },
  methods: {
    doclick() {
      this.$store.state.count += 1;
    }
  }
};
</script>
